/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.crossriver.crgis.database.model;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.impl.BaseModelImpl;

import java.io.Serializable;

import java.lang.reflect.Proxy;

/**
 * @author Wole Adetiba
 */
public class Company_Contact_PersonClp extends BaseModelImpl<Company_Contact_Person>
	implements Company_Contact_Person {
	public Company_Contact_PersonClp() {
	}

	public String getPrimaryKey() {
		return _applicationId;
	}

	public void setPrimaryKey(String pk) {
		setApplicationId(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return _applicationId;
	}

	public String getApplicationId() {
		return _applicationId;
	}

	public void setApplicationId(String applicationId) {
		_applicationId = applicationId;
	}

	public String getUserId() {
		return _userId;
	}

	public void setUserId(String userId) {
		_userId = userId;
	}

	public String getDesignation() {
		return _designation;
	}

	public void setDesignation(String designation) {
		_designation = designation;
	}

	public String getTitle() {
		return _title;
	}

	public void setTitle(String title) {
		_title = title;
	}

	public String getLastName() {
		return _lastName;
	}

	public void setLastName(String lastName) {
		_lastName = lastName;
	}

	public String getFirstName() {
		return _firstName;
	}

	public void setFirstName(String firstName) {
		_firstName = firstName;
	}

	public String getMiddleName() {
		return _middleName;
	}

	public void setMiddleName(String middleName) {
		_middleName = middleName;
	}

	public String getPhoneHome() {
		return _phoneHome;
	}

	public void setPhoneHome(String phoneHome) {
		_phoneHome = phoneHome;
	}

	public String getPhoneOffice() {
		return _phoneOffice;
	}

	public void setPhoneOffice(String phoneOffice) {
		_phoneOffice = phoneOffice;
	}

	public String getPhoneMobile() {
		return _phoneMobile;
	}

	public void setPhoneMobile(String phoneMobile) {
		_phoneMobile = phoneMobile;
	}

	public String getFax() {
		return _fax;
	}

	public void setFax(String fax) {
		_fax = fax;
	}

	public String getEmailAddress() {
		return _emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		_emailAddress = emailAddress;
	}

	public String getIdentificationDoc() {
		return _identificationDoc;
	}

	public void setIdentificationDoc(String identificationDoc) {
		_identificationDoc = identificationDoc;
	}

	public String getIdentificationDocNo() {
		return _identificationDocNo;
	}

	public void setIdentificationDocNo(String identificationDocNo) {
		_identificationDocNo = identificationDocNo;
	}

	public Company_Contact_Person toEscapedModel() {
		if (isEscapedModel()) {
			return this;
		}
		else {
			return (Company_Contact_Person)Proxy.newProxyInstance(Company_Contact_Person.class.getClassLoader(),
				new Class[] { Company_Contact_Person.class },
				new AutoEscapeBeanHandler(this));
		}
	}

	public Object clone() {
		Company_Contact_PersonClp clone = new Company_Contact_PersonClp();

		clone.setApplicationId(getApplicationId());
		clone.setUserId(getUserId());
		clone.setDesignation(getDesignation());
		clone.setTitle(getTitle());
		clone.setLastName(getLastName());
		clone.setFirstName(getFirstName());
		clone.setMiddleName(getMiddleName());
		clone.setPhoneHome(getPhoneHome());
		clone.setPhoneOffice(getPhoneOffice());
		clone.setPhoneMobile(getPhoneMobile());
		clone.setFax(getFax());
		clone.setEmailAddress(getEmailAddress());
		clone.setIdentificationDoc(getIdentificationDoc());
		clone.setIdentificationDocNo(getIdentificationDocNo());

		return clone;
	}

	public int compareTo(Company_Contact_Person company_Contact_Person) {
		int value = 0;

		value = getApplicationId()
					.compareTo(company_Contact_Person.getApplicationId());

		if (value != 0) {
			return value;
		}

		return 0;
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		Company_Contact_PersonClp company_Contact_Person = null;

		try {
			company_Contact_Person = (Company_Contact_PersonClp)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		String pk = company_Contact_Person.getPrimaryKey();

		if (getPrimaryKey().equals(pk)) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return getPrimaryKey().hashCode();
	}

	public String toString() {
		StringBundler sb = new StringBundler(29);

		sb.append("{applicationId=");
		sb.append(getApplicationId());
		sb.append(", userId=");
		sb.append(getUserId());
		sb.append(", designation=");
		sb.append(getDesignation());
		sb.append(", title=");
		sb.append(getTitle());
		sb.append(", lastName=");
		sb.append(getLastName());
		sb.append(", firstName=");
		sb.append(getFirstName());
		sb.append(", middleName=");
		sb.append(getMiddleName());
		sb.append(", phoneHome=");
		sb.append(getPhoneHome());
		sb.append(", phoneOffice=");
		sb.append(getPhoneOffice());
		sb.append(", phoneMobile=");
		sb.append(getPhoneMobile());
		sb.append(", fax=");
		sb.append(getFax());
		sb.append(", emailAddress=");
		sb.append(getEmailAddress());
		sb.append(", identificationDoc=");
		sb.append(getIdentificationDoc());
		sb.append(", identificationDocNo=");
		sb.append(getIdentificationDocNo());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(46);

		sb.append("<model><model-name>");
		sb.append("com.crossriver.crgis.database.model.Company_Contact_Person");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>applicationId</column-name><column-value><![CDATA[");
		sb.append(getApplicationId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>userId</column-name><column-value><![CDATA[");
		sb.append(getUserId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>designation</column-name><column-value><![CDATA[");
		sb.append(getDesignation());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>title</column-name><column-value><![CDATA[");
		sb.append(getTitle());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>lastName</column-name><column-value><![CDATA[");
		sb.append(getLastName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>firstName</column-name><column-value><![CDATA[");
		sb.append(getFirstName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>middleName</column-name><column-value><![CDATA[");
		sb.append(getMiddleName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>phoneHome</column-name><column-value><![CDATA[");
		sb.append(getPhoneHome());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>phoneOffice</column-name><column-value><![CDATA[");
		sb.append(getPhoneOffice());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>phoneMobile</column-name><column-value><![CDATA[");
		sb.append(getPhoneMobile());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>fax</column-name><column-value><![CDATA[");
		sb.append(getFax());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>emailAddress</column-name><column-value><![CDATA[");
		sb.append(getEmailAddress());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>identificationDoc</column-name><column-value><![CDATA[");
		sb.append(getIdentificationDoc());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>identificationDocNo</column-name><column-value><![CDATA[");
		sb.append(getIdentificationDocNo());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private String _applicationId;
	private String _userId;
	private String _designation;
	private String _title;
	private String _lastName;
	private String _firstName;
	private String _middleName;
	private String _phoneHome;
	private String _phoneOffice;
	private String _phoneMobile;
	private String _fax;
	private String _emailAddress;
	private String _identificationDoc;
	private String _identificationDocNo;
}